<!doctype html>



  


<html class="theme-next muse use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.1" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Nginx,LNMP," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.1" />






<meta name="description" content="12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210">
<meta name="keywords" content="Nginx,LNMP">
<meta property="og:type" content="article">
<meta property="og:title" content="nginx配置详解">
<meta property="og:url" content="https://hcldirgit.github.io/2017/09/03/Nginx/10. nginx配置详解/index.html">
<meta property="og:site_name" content="失落的乐章">
<meta property="og:description" content="12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2017-09-01T09:08:44.644Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="nginx配置详解">
<meta name="twitter:description" content="12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://hcldirgit.github.io/2017/09/03/Nginx/10. nginx配置详解/"/>





  <title>nginx配置详解 | 失落的乐章</title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  




<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  ga('create', '85*****1', 'auto');
  ga('send', 'pageview');
</script>


  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?87980c**************99ec5e26fb5";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>











  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">失落的乐章</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">技术面前，永远都是学生。</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-message">
          <a href="/message" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-external-link"></i> <br />
            
            留言
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="https://hcldirgit.github.io/2017/09/03/Nginx/10. nginx配置详解/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="失落的乐章">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/0.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="失落的乐章">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">nginx配置详解</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-09-03T02:06:42+08:00">
                2017-09-03
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    <div class="post-body" itemprop="articleBody">

      
      

      
        <figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div><div class="line">72</div><div class="line">73</div><div class="line">74</div><div class="line">75</div><div class="line">76</div><div class="line">77</div><div class="line">78</div><div class="line">79</div><div class="line">80</div><div class="line">81</div><div class="line">82</div><div class="line">83</div><div class="line">84</div><div class="line">85</div><div class="line">86</div><div class="line">87</div><div class="line">88</div><div class="line">89</div><div class="line">90</div><div class="line">91</div><div class="line">92</div><div class="line">93</div><div class="line">94</div><div class="line">95</div><div class="line">96</div><div class="line">97</div><div class="line">98</div><div class="line">99</div><div class="line">100</div><div class="line">101</div><div class="line">102</div><div class="line">103</div><div class="line">104</div><div class="line">105</div><div class="line">106</div><div class="line">107</div><div class="line">108</div><div class="line">109</div><div class="line">110</div><div class="line">111</div><div class="line">112</div><div class="line">113</div><div class="line">114</div><div class="line">115</div><div class="line">116</div><div class="line">117</div><div class="line">118</div><div class="line">119</div><div class="line">120</div><div class="line">121</div><div class="line">122</div><div class="line">123</div><div class="line">124</div><div class="line">125</div><div class="line">126</div><div class="line">127</div><div class="line">128</div><div class="line">129</div><div class="line">130</div><div class="line">131</div><div class="line">132</div><div class="line">133</div><div class="line">134</div><div class="line">135</div><div class="line">136</div><div class="line">137</div><div class="line">138</div><div class="line">139</div><div class="line">140</div><div class="line">141</div><div class="line">142</div><div class="line">143</div><div class="line">144</div><div class="line">145</div><div class="line">146</div><div class="line">147</div><div class="line">148</div><div class="line">149</div><div class="line">150</div><div class="line">151</div><div class="line">152</div><div class="line">153</div><div class="line">154</div><div class="line">155</div><div class="line">156</div><div class="line">157</div><div class="line">158</div><div class="line">159</div><div class="line">160</div><div class="line">161</div><div class="line">162</div><div class="line">163</div><div class="line">164</div><div class="line">165</div><div class="line">166</div><div class="line">167</div><div class="line">168</div><div class="line">169</div><div class="line">170</div><div class="line">171</div><div class="line">172</div><div class="line">173</div><div class="line">174</div><div class="line">175</div><div class="line">176</div><div class="line">177</div><div class="line">178</div><div class="line">179</div><div class="line">180</div><div class="line">181</div><div class="line">182</div><div class="line">183</div><div class="line">184</div><div class="line">185</div><div class="line">186</div><div class="line">187</div><div class="line">188</div><div class="line">189</div><div class="line">190</div><div class="line">191</div><div class="line">192</div><div class="line">193</div><div class="line">194</div><div class="line">195</div><div class="line">196</div><div class="line">197</div><div class="line">198</div><div class="line">199</div><div class="line">200</div><div class="line">201</div><div class="line">202</div><div class="line">203</div><div class="line">204</div><div class="line">205</div><div class="line">206</div><div class="line">207</div><div class="line">208</div><div class="line">209</div><div class="line">210</div><div class="line">211</div><div class="line">212</div><div class="line">213</div><div class="line">214</div><div class="line">215</div><div class="line">216</div><div class="line">217</div><div class="line">218</div><div class="line">219</div><div class="line">220</div><div class="line">221</div><div class="line">222</div><div class="line">223</div><div class="line">224</div><div class="line">225</div><div class="line">226</div><div class="line">227</div><div class="line">228</div><div class="line">229</div><div class="line">230</div><div class="line">231</div><div class="line">232</div><div class="line">233</div><div class="line">234</div><div class="line">235</div><div class="line">236</div><div class="line">237</div><div class="line">238</div><div class="line">239</div><div class="line">240</div><div class="line">241</div><div class="line">242</div><div class="line">243</div><div class="line">244</div><div class="line">245</div><div class="line">246</div><div class="line">247</div><div class="line">248</div><div class="line">249</div><div class="line">250</div><div class="line">251</div><div class="line">252</div><div class="line">253</div><div class="line">254</div><div class="line">255</div><div class="line">256</div><div class="line">257</div><div class="line">258</div><div class="line">259</div><div class="line">260</div><div class="line">261</div><div class="line">262</div><div class="line">263</div><div class="line">264</div><div class="line">265</div><div class="line">266</div><div class="line">267</div><div class="line">268</div><div class="line">269</div><div class="line">270</div><div class="line">271</div><div class="line">272</div><div class="line">273</div><div class="line">274</div><div class="line">275</div><div class="line">276</div><div class="line">277</div><div class="line">278</div><div class="line">279</div><div class="line">280</div><div class="line">281</div><div class="line">282</div><div class="line">283</div><div class="line">284</div><div class="line">285</div><div class="line">286</div><div class="line">287</div><div class="line">288</div><div class="line">289</div><div class="line">290</div><div class="line">291</div><div class="line">292</div><div class="line">293</div><div class="line">294</div><div class="line">295</div><div class="line">296</div><div class="line">297</div><div class="line">298</div><div class="line">299</div><div class="line">300</div><div class="line">301</div><div class="line">302</div><div class="line">303</div><div class="line">304</div><div class="line">305</div><div class="line">306</div><div class="line">307</div><div class="line">308</div><div class="line">309</div><div class="line">310</div><div class="line">311</div><div class="line">312</div><div class="line">313</div><div class="line">314</div><div class="line">315</div><div class="line">316</div><div class="line">317</div><div class="line">318</div><div class="line">319</div><div class="line">320</div><div class="line">321</div><div class="line">322</div><div class="line">323</div><div class="line">324</div><div class="line">325</div><div class="line">326</div><div class="line">327</div><div class="line">328</div><div class="line">329</div><div class="line">330</div><div class="line">331</div><div class="line">332</div><div class="line">333</div><div class="line">334</div><div class="line">335</div><div class="line">336</div><div class="line">337</div><div class="line">338</div><div class="line">339</div><div class="line">340</div><div class="line">341</div><div class="line">342</div><div class="line">343</div><div class="line">344</div><div class="line">345</div><div class="line">346</div><div class="line">347</div><div class="line">348</div><div class="line">349</div><div class="line">350</div><div class="line">351</div><div class="line">352</div><div class="line">353</div><div class="line">354</div><div class="line">355</div><div class="line">356</div><div class="line">357</div><div class="line">358</div><div class="line">359</div><div class="line">360</div><div class="line">361</div><div class="line">362</div><div class="line">363</div><div class="line">364</div><div class="line">365</div><div class="line">366</div><div class="line">367</div><div class="line">368</div><div class="line">369</div><div class="line">370</div><div class="line">371</div><div class="line">372</div><div class="line">373</div><div class="line">374</div><div class="line">375</div><div class="line">376</div><div class="line">377</div><div class="line">378</div><div class="line">379</div><div class="line">380</div><div class="line">381</div><div class="line">382</div><div class="line">383</div><div class="line">384</div><div class="line">385</div><div class="line">386</div><div class="line">387</div><div class="line">388</div><div class="line">389</div><div class="line">390</div><div class="line">391</div><div class="line">392</div><div class="line">393</div><div class="line">394</div></pre></td><td class="code"><pre><div class="line">user nginx ;</div><div class="line"><span class="comment">#用户</span></div><div class="line"></div><div class="line">worker_processes 8;</div><div class="line"><span class="comment">#工作进程，根据硬件调整，大于等于cpu核数</span></div><div class="line"></div><div class="line">error_log logs/nginx_error.log crit;</div><div class="line"><span class="comment">#错误日志</span></div><div class="line"></div><div class="line">pid logs/nginx.pid;</div><div class="line"><span class="comment">#pid放置的位置</span></div><div class="line"></div><div class="line">worker_rlimit_nofile 204800;</div><div class="line"><span class="comment">#指定进程可以打开的最大描述符</span></div><div class="line">这个指令是指当一个nginx进程打开的最多文件描述符数目，理论值应该是最多打开文</div><div class="line">件数（<span class="built_in">ulimit</span> -n）与nginx进程数相除，但是nginx分配请求并不是那么均匀，所以最好与<span class="built_in">ulimit</span> -n 的值保持一致。</div><div class="line">现在在linux 2.6内核下开启文件打开数为65535，worker_rlimit_nofile就相应应该填写65535。</div><div class="line">这是因为nginx调度时分配请求到进程并不是那么的均衡，所以假如填写10240，总并发量达到3-4万时就有进程可能超过10240了，这时会返回502错误。</div><div class="line"></div><div class="line">events</div><div class="line"></div><div class="line">&#123;</div><div class="line">use epoll;</div><div class="line"><span class="comment">#使用epoll的I/O 模型</span></div><div class="line">补充说明:</div><div class="line">与apache相类，nginx针对不同的操作系统，有不同的事件模型</div><div class="line">A）标准事件模型</div><div class="line">Select、poll属于标准事件模型，如果当前系统不存在更有效的方法，nginx会选择select或poll</div><div class="line">B）高效事件模型</div><div class="line">Kqueue：使用于FreeBSD 4.1+, OpenBSD 2.9+, NetBSD 2.0 和 MacOS X.使用双处理器的MacOS X系统使用kqueue可能会造成内核崩溃。</div><div class="line">Epoll:使用于Linux内核2.6版本及以后的系统。</div><div class="line">/dev/poll：使用于Solaris 7 11/99+, HP/UX 11.22+ (eventport), IRIX 6.5.15+ 和 Tru64 UNIX 5.1A+。</div><div class="line">Eventport：使用于Solaris 10. 为了防止出现内核崩溃的问题， 有必要安装安全补丁</div><div class="line"></div><div class="line"></div><div class="line">worker_connections 204800;</div><div class="line"><span class="comment">#工作进程的最大连接数量，根据硬件调整，和前面工作进程配合起来用，尽量大，但是别把cpu跑到100%就行</span></div><div class="line">每个进程允许的最多连接数， 理论上每台nginx服务器的最大连接数为worker_processes*worker_connections</div><div class="line"></div><div class="line">keepalive_timeout 60;</div><div class="line"></div><div class="line">keepalive超时时间。</div><div class="line"></div><div class="line">client_header_buffer_size 4k;</div><div class="line"></div><div class="line">客户端请求头部的缓冲区大小，这个可以根据你的系统分页大小来设置，一般一个请求头的大小不会超过1k，不过由于一般系统分页都要大于1k，所以这里设置为分页大小。</div><div class="line">分页大小可以用命令getconf PAGESIZE 取得。</div><div class="line">[root@web001 ~]<span class="comment"># getconf PAGESIZE</span></div><div class="line">4096</div><div class="line">但也有client_header_buffer_size超过4k的情况，但是client_header_buffer_size该值必须设置为“系统分页大小”的整倍数。</div><div class="line"></div><div class="line">open_file_cache max=65535 inactive=60s;</div><div class="line"></div><div class="line">这个将为打开文件指定缓存，默认是没有启用的，max指定缓存数量，建议和打开文件数一致，inactive是指经过多长时间文件没被请求后删除缓存。</div><div class="line"></div><div class="line">open_file_cache_valid 80s;</div><div class="line"></div><div class="line">这个是指多长时间检查一次缓存的有效信息。</div><div class="line"></div><div class="line">open_file_cache_min_uses 1;</div><div class="line"></div><div class="line">open_file_cache指令中的inactive参数时间内文件的最少使用次数，如果超过这个数字，文件描述符一直是在缓存中打开的，如上例，如果有一个文件在inactive时间内一次没被使用，它将被移除。</div><div class="line"></div><div class="line"></div><div class="line">&#125;</div><div class="line"></div><div class="line"><span class="comment">#设定http服务器，利用它的反向代理功能提供负载均衡支持</span></div><div class="line">http</div><div class="line">&#123;</div><div class="line">include mime.types;</div><div class="line"><span class="comment">#设定mime类型,类型由mime.type文件定义</span></div><div class="line">default_type application/octet-stream;</div><div class="line">log_format main <span class="string">'$host $status [$time_local] $remote_addr [$time_local] $request_uri '</span></div><div class="line"><span class="string">'"$http_referer" "$http_user_agent" "$http_x_forwarded_for" '</span></div><div class="line"><span class="string">'$bytes_sent $request_time $sent_http_x_cache_hit'</span>;</div><div class="line">log_format log404 <span class="string">'$status [$time_local] $remote_addr $host$request_uri $sent_http_location'</span>;</div><div class="line"><span class="variable">$remote_addr</span>与<span class="variable">$http_x_forwarded_for</span>用以记录客户端的ip地址；</div><div class="line"><span class="variable">$remote_user</span>：用来记录客户端用户名称；</div><div class="line"><span class="variable">$time_local</span>： 用来记录访问时间与时区；</div><div class="line"><span class="variable">$request</span>： 用来记录请求的url与http协议；</div><div class="line"><span class="variable">$status</span>： 用来记录请求状态；成功是200，</div><div class="line"><span class="variable">$body_bytes_s</span> ent ：记录发送给客户端文件主体内容大小；</div><div class="line"><span class="variable">$http_referer</span>：用来记录从那个页面链接访问过来的；</div><div class="line"><span class="variable">$http_user_agent</span>：记录客户毒啊浏览器的相关信息；</div><div class="line">通常web服务器放在反向代理的后面，这样就不能获取到客户的IP地址了，通过<span class="variable">$remote_add</span>拿到的IP地址是反向代理服务器的iP地址。反向代理服务器在转发请求的http头信息中，可以增加x_forwarded_for信息，用以记录原有客户端的IP地址和原来客户端的请求的服务器地址；</div><div class="line">access_log /dev/null;</div><div class="line"><span class="comment">#用了log_format指令设置了日志格式之后，需要用access_log指令指定日志文件的存放路径；</span></div><div class="line"><span class="comment"># access_log /usr/local/nginx/logs/access_log main;</span></div><div class="line">server_names_hash_bucket_size 128;</div><div class="line"><span class="comment">#保存服务器名字的hash表是由指令server_names_hash_max_size 和server_names_hash_bucket_size所控制的。参数hash bucket size总是等于hash表的大小，并且是一路处理器缓存大小的倍数。在减少了在内存中的存取次数后，使在处理器中加速查找hash表键值成为可能。如果hash bucket size等于一路处理器缓存的大小，那么在查找键的时候，最坏的情况下在内存中查找的次数为2。第一次是确定存储单元的地址，第二次是在存储单元中查找键 值。因此，如果Nginx给出需要增大hash max size 或 hash bucket size的提示，那么首要的是增大前一个参数的大小.</span></div><div class="line"></div><div class="line">client_header_buffer_size 4k;</div><div class="line">客户端请求头部的缓冲区大小，这个可以根据你的系统分页大小来设置，一般一个请求的头部大小不会超过1k，不过由于一般系统分页都要大于1k，所以这里设置为分页大小。分页大小可以用命令getconf PAGESIZE取得。</div><div class="line"></div><div class="line">large_client_header_buffers 8 128k;</div><div class="line">客户请求头缓冲大小</div><div class="line">nginx默认会用client_header_buffer_size这个buffer来读取header值，如果</div><div class="line">header过大，它会使用large_client_header_buffers来读取</div><div class="line">如果设置过小HTTP头/Cookie过大 会报400 错误nginx 400 bad request</div><div class="line">求行如果超过buffer，就会报HTTP 414错误(URI Too Long)</div><div class="line">nginx接受最长的HTTP头部大小必须比其中一个buffer大，否则就会报400的</div><div class="line">HTTP错误(Bad Request)。</div><div class="line">open_file_cache max 102400</div><div class="line">使用字段:http, server, location 这个指令指定缓存是否启用,如果启用,将记录文件以下信息: ·打开的文件描述符,大小信息和修改时间. ·存在的目录信息. ·在搜索文件过程中的错误信息 --没有这个文件,无法正确读取,参考open_file_cache_errors指令选项:</div><div class="line">·max -指定缓存的最大数目,如果缓存溢出,最长使用过的文件(LRU)将被移除</div><div class="line">例: open_file_cache max=1000 inactive=20s; open_file_cache_valid 30s; open_file_cache_min_uses 2; open_file_cache_errors on;</div><div class="line">open_file_cache_errors</div><div class="line">语法:open_file_cache_errors on | off 默认值:open_file_cache_errors off 使用字段:http, server, location 这个指令指定是否在搜索一个文件是记录cache错误.</div><div class="line">open_file_cache_min_uses</div><div class="line">语法:open_file_cache_min_uses number 默认值:open_file_cache_min_uses 1 使用字段:http, server, location 这个指令指定了在open_file_cache指令无效的参数中一定的时间范围内可以使用的最小文件数,如 果使用更大的值,文件描述符在cache中总是打开状态.</div><div class="line">open_file_cache_valid</div><div class="line">语法:open_file_cache_valid time 默认值:open_file_cache_valid 60 使用字段:http, server, location 这个指令指定了何时需要检查open_file_cache中缓存项目的有效信息.</div><div class="line"></div><div class="line">client_max_body_size 300m;</div><div class="line">设定通过nginx上传文件的大小</div><div class="line"></div><div class="line">sendfile on;</div><div class="line"><span class="comment">#sendfile指令指定 nginx 是否调用sendfile 函数（zero copy 方式）来输出文件，</span></div><div class="line">对于普通应用，必须设为on。</div><div class="line">如果用来进行下载等应用磁盘IO重负载应用，可设置为off，以平衡磁盘与网络IO处理速度，降低系统uptime。</div><div class="line">tcp_nopush on;</div><div class="line">此选项允许或禁止使用socke的TCP_CORK的选项，此选项仅在使用sendfile的时候使用</div><div class="line"></div><div class="line">proxy_connect_timeout 90; </div><div class="line"><span class="comment">#后端服务器连接的超时时间_发起握手等候响应超时时间</span></div><div class="line">proxy_read_timeout 180;</div><div class="line"><span class="comment">#连接成功后_等候后端服务器响应时间_其实已经进入后端的排队之中等候处理（也可以说是后端服务器处理请求的时间）</span></div><div class="line">proxy_send_timeout 180;</div><div class="line"><span class="comment">#后端服务器数据回传时间_就是在规定时间之内后端服务器必须传完所有的数据</span></div><div class="line">proxy_buffer_size 256k;</div><div class="line"><span class="comment">#设置从被代理服务器读取的第一部分应答的缓冲区大小，通常情况下这部分应答中包含一个小的应答头，默认情况下这个值的大小为指令proxy_buffers中指定的一个缓冲区的大小，不过可以将其设置为更小</span></div><div class="line">proxy_buffers 4 256k;</div><div class="line"><span class="comment">#设置用于读取应答（来自被代理服务器）的缓冲区数目和大小，默认情况也为分页大小，根据操作系统的不同可能是4k或者8k</span></div><div class="line">proxy_busy_buffers_size 256k;</div><div class="line"></div><div class="line">proxy_temp_file_write_size 256k;</div><div class="line"><span class="comment">#设置在写入proxy_temp_path时数据的大小，预防一个工作进程在传递文件时阻塞太长</span></div><div class="line">proxy_temp_path /data0/proxy_temp_dir;</div><div class="line"><span class="comment">#proxy_temp_path和proxy_cache_path指定的路径必须在同一分区</span></div><div class="line">proxy_cache_path /data0/proxy_cache_dir levels=1:2 keys_zone=cache_one:200m inactive=1d max_size=30g;</div><div class="line"><span class="comment">#设置内存缓存空间大小为200MB，1天没有被访问的内容自动清除，硬盘缓存空间大小为30GB。</span></div><div class="line"></div><div class="line">keepalive_timeout 120;</div><div class="line">keepalive超时时间。</div><div class="line">tcp_nodelay on;</div><div class="line">client_body_buffer_size 512k;</div><div class="line">如果把它设置为比较大的数值，例如256k，那么，无论使用firefox还是IE浏览器，来提交任意小于256k的图片，都很正常。如果注释该指令，使用默认的client_body_buffer_size设置，也就是操作系统页面大小的两倍，8k或者16k，问题就出现了。</div><div class="line">无论使用firefox4.0还是IE8.0，提交一个比较大，200k左右的图片，都返回500 Internal Server Error错误</div><div class="line">proxy_intercept_errors on;</div><div class="line">表示使nginx阻止HTTP应答代码为400或者更高的应答。</div><div class="line"></div><div class="line">upstream img_relay &#123;</div><div class="line">server 127.0.0.1:8027;</div><div class="line">server 127.0.0.1:8028;</div><div class="line">server 127.0.0.1:8029;</div><div class="line"><span class="built_in">hash</span> <span class="variable">$request_uri</span>;</div><div class="line">&#125;</div><div class="line">nginx的upstream目前支持4种方式的分配</div><div class="line">1、轮询（默认）</div><div class="line">每个请求按时间顺序逐一分配到不同的后端服务器，如果后端服务器down掉，能自动剔除。</div><div class="line">2、weight</div><div class="line">指定轮询几率，weight和访问比率成正比，用于后端服务器性能不均的情况。</div><div class="line">例如：</div><div class="line">upstream bakend &#123;</div><div class="line">server 192.168.0.14 weight=10;</div><div class="line">server 192.168.0.15 weight=10;</div><div class="line">&#125;</div><div class="line">2、ip_hash</div><div class="line">每个请求按访问ip的<span class="built_in">hash</span>结果分配，这样每个访客固定访问一个后端服务器，可以解决session的问题。</div><div class="line">例如：</div><div class="line">upstream bakend &#123;</div><div class="line">ip_hash;</div><div class="line">server 192.168.0.14:88;</div><div class="line">server 192.168.0.15:80;</div><div class="line">&#125;</div><div class="line">3、fair（第三方）</div><div class="line">按后端服务器的响应时间来分配请求，响应时间短的优先分配。</div><div class="line">upstream backend &#123;</div><div class="line">server server1;</div><div class="line">server server2;</div><div class="line">fair;</div><div class="line">&#125;</div><div class="line">4、url_hash（第三方）</div><div class="line">按访问url的<span class="built_in">hash</span>结果来分配请求，使每个url定向到同一个后端服务器，后端服务器为缓存时比较有效。</div><div class="line">例：在upstream中加入<span class="built_in">hash</span>语句，server语句中不能写入weight等其他的参数，hash_method是使用的<span class="built_in">hash</span>算法</div><div class="line">upstream backend &#123;</div><div class="line">server squid1:3128;</div><div class="line">server squid2:3128;</div><div class="line"><span class="built_in">hash</span> <span class="variable">$request_uri</span>;</div><div class="line">hash_method crc32;</div><div class="line">&#125;</div><div class="line">tips:</div><div class="line">upstream bakend&#123;<span class="comment">#定义负载均衡设备的Ip及设备状态</span></div><div class="line">ip_hash;</div><div class="line">server 127.0.0.1:9090 down;</div><div class="line">server 127.0.0.1:8080 weight=2;</div><div class="line">server 127.0.0.1:6060;</div><div class="line">server 127.0.0.1:7070 backup;</div><div class="line">&#125;</div><div class="line">在需要使用负载均衡的server中增加</div><div class="line">proxy_pass http://bakend/;</div><div class="line">每个设备的状态设置为:</div><div class="line">1.down表示单前的server暂时不参与负载</div><div class="line">2.weight默认为1.weight越大，负载的权重就越大。</div><div class="line">3.max_fails：允许请求失败的次数默认为1.当超过最大次数时，返回proxy_next_upstream模块定义的错误</div><div class="line">4.fail_timeout:max_fails次失败后，暂停的时间。</div><div class="line">5.backup： 其它所有的非backup机器down或者忙的时候，请求backup机器。所以这台机器压力会最轻。</div><div class="line">nginx支持同时设置多组的负载均衡，用来给不用的server来使用。</div><div class="line">client_body_in_file_only设置为On 可以讲client post过来的数据记录到文件中用来做debug</div><div class="line">client_body_temp_path设置记录文件的目录 可以设置最多3层目录</div><div class="line">location对URL进行匹配.可以进行重定向或者进行新的代理 负载均衡</div><div class="line"></div><div class="line">server</div><div class="line"><span class="comment">#配置虚拟机</span></div><div class="line">&#123;</div><div class="line">listen 80;</div><div class="line"><span class="comment">#配置监听端口</span></div><div class="line">server_name image.***.com;</div><div class="line"><span class="comment">#配置访问域名</span></div><div class="line">location ~* \.(mp3|exe)$ &#123;</div><div class="line"><span class="comment">#对以“mp3或exe”结尾的地址进行负载均衡</span></div><div class="line">proxy_pass http://img_relay<span class="variable">$request_uri</span>;</div><div class="line"><span class="comment">#设置被代理服务器的端口或套接字，以及URL</span></div><div class="line">proxy_set_header Host <span class="variable">$host</span>;</div><div class="line">proxy_set_header X-Real-IP <span class="variable">$remote_addr</span>;</div><div class="line">proxy_set_header X-Forwarded-For <span class="variable">$proxy_add_x_forwarded_for</span>;</div><div class="line"><span class="comment">#以上三行，目的是将代理服务器收到的用户的信息传到真实服务器上</span></div><div class="line">&#125;</div><div class="line">location /face &#123;</div><div class="line"><span class="keyword">if</span> (<span class="variable">$http_user_agent</span> ~* <span class="string">"xnp"</span>) &#123;</div><div class="line">rewrite ^(.*)$ http://211.151.188.190:8080/face.jpg redirect;</div><div class="line">&#125;</div><div class="line">proxy_pass http://img_relay<span class="variable">$request_uri</span>;</div><div class="line">proxy_set_header Host <span class="variable">$host</span>;</div><div class="line">proxy_set_header X-Real-IP <span class="variable">$remote_addr</span>;</div><div class="line">proxy_set_header X-Forwarded-For <span class="variable">$proxy_add_x_forwarded_for</span>;</div><div class="line">error_page 404 502 = @fetch;</div><div class="line">&#125;</div><div class="line">location @fetch &#123;</div><div class="line">access_log /data/logs/face.log log404;</div><div class="line"><span class="comment">#设定本服务器的访问日志</span></div><div class="line">rewrite ^(.*)$ http://211.151.188.190:8080/face.jpg redirect;</div><div class="line">&#125;</div><div class="line"></div><div class="line">location /image &#123;</div><div class="line"><span class="keyword">if</span> (<span class="variable">$http_user_agent</span> ~* <span class="string">"xnp"</span>) &#123;</div><div class="line">rewrite ^(.*)$ http://211.151.188.190:8080/face.jpg redirect;</div><div class="line">&#125;</div><div class="line">proxy_pass http://img_relay<span class="variable">$request_uri</span>;</div><div class="line">proxy_set_header Host <span class="variable">$host</span>;</div><div class="line">proxy_set_header X-Real-IP <span class="variable">$remote_addr</span>;</div><div class="line">proxy_set_header X-Forwarded-For <span class="variable">$proxy_add_x_forwarded_for</span>;</div><div class="line">error_page 404 502 = @fetch;</div><div class="line">&#125;</div><div class="line">location @fetch &#123;</div><div class="line">access_log /data/logs/image.log log404;</div><div class="line">rewrite ^(.*)$ http://211.151.188.190:8080/face.jpg redirect;</div><div class="line">&#125;</div><div class="line">&#125;</div><div class="line">server</div><div class="line">&#123;</div><div class="line">listen 80;</div><div class="line">server_name *.***.com *.***.cn;</div><div class="line">location ~* \.(mp3|exe)$ &#123;</div><div class="line">proxy_pass http://img_relay<span class="variable">$request_uri</span>;</div><div class="line">proxy_set_header Host <span class="variable">$host</span>;</div><div class="line">proxy_set_header X-Real-IP <span class="variable">$remote_addr</span>;</div><div class="line">proxy_set_header X-Forwarded-For <span class="variable">$proxy_add_x_forwarded_for</span>;</div><div class="line">&#125;</div><div class="line">location / &#123;</div><div class="line"><span class="keyword">if</span> (<span class="variable">$http_user_agent</span> ~* <span class="string">"xnp"</span>) &#123;</div><div class="line">rewrite ^(.*)$ http://i1.***img.com/<span class="built_in">help</span>/noimg.gif redirect;</div><div class="line">&#125;</div><div class="line">proxy_pass http://img_relay<span class="variable">$request_uri</span>;</div><div class="line">proxy_set_header Host <span class="variable">$host</span>;</div><div class="line">proxy_set_header X-Real-IP <span class="variable">$remote_addr</span>;</div><div class="line">proxy_set_header X-Forwarded-For <span class="variable">$proxy_add_x_forwarded_for</span>;</div><div class="line"><span class="comment">#error_page 404 http://i1.***img.com/help/noimg.gif;</span></div><div class="line">error_page 404 502 = @fetch;</div><div class="line">&#125;</div><div class="line">location @fetch &#123;</div><div class="line">access_log /data/logs/baijiaqi.log log404;</div><div class="line">rewrite ^(.*)$ http://i1.***img.com/<span class="built_in">help</span>/noimg.gif redirect;</div><div class="line">&#125;</div><div class="line"><span class="comment">#access_log off;</span></div><div class="line">&#125;</div><div class="line"></div><div class="line">server</div><div class="line">&#123;</div><div class="line">listen 80;</div><div class="line">server_name *.***img.com;</div><div class="line"></div><div class="line">location ~* \.(mp3|exe)$ &#123;</div><div class="line">proxy_pass http://img_relay<span class="variable">$request_uri</span>;</div><div class="line">proxy_set_header Host <span class="variable">$host</span>;</div><div class="line">proxy_set_header X-Real-IP <span class="variable">$remote_addr</span>;</div><div class="line">proxy_set_header X-Forwarded-For <span class="variable">$proxy_add_x_forwarded_for</span>;</div><div class="line">&#125;</div><div class="line"></div><div class="line">location / &#123;</div><div class="line"><span class="keyword">if</span> (<span class="variable">$http_user_agent</span> ~* <span class="string">"xnp"</span>) &#123;</div><div class="line">rewrite ^(.*)$ http://i1.***img.com/<span class="built_in">help</span>/noimg.gif;</div><div class="line">&#125;</div><div class="line">proxy_pass http://img_relay<span class="variable">$request_uri</span>;</div><div class="line">proxy_set_header Host <span class="variable">$host</span>;</div><div class="line">proxy_set_header X-Real-IP <span class="variable">$remote_addr</span>;</div><div class="line">proxy_set_header X-Forwarded-For <span class="variable">$proxy_add_x_forwarded_for</span>;</div><div class="line"><span class="comment">#error_page 404 http://i1.***img.com/help/noimg.gif;</span></div><div class="line">error_page 404 = @fetch;</div><div class="line">&#125;</div><div class="line"><span class="comment">#access_log off;</span></div><div class="line">location @fetch &#123;</div><div class="line">access_log /data/logs/baijiaqi.log log404;</div><div class="line">rewrite ^(.*)$ http://i1.***img.com/<span class="built_in">help</span>/noimg.gif redirect;</div><div class="line">&#125;</div><div class="line">&#125;</div><div class="line">server</div><div class="line">&#123;</div><div class="line">listen 8080;</div><div class="line">server_name ngx-ha.***img.com;</div><div class="line">location / &#123;</div><div class="line">stub_status on;</div><div class="line">access_log off;</div><div class="line">&#125;</div><div class="line">&#125;</div><div class="line">server &#123;</div><div class="line">listen 80;</div><div class="line">server_name imgsrc1.***.net;</div><div class="line">root html;</div><div class="line">&#125;</div><div class="line">server &#123;</div><div class="line">listen 80;</div><div class="line">server_name ***.com w.***.com;</div><div class="line"><span class="comment"># access_log /usr/local/nginx/logs/access_log main;</span></div><div class="line">location / &#123;</div><div class="line">rewrite ^(.*)$ http://www.***.com/ ;</div><div class="line">&#125;</div><div class="line">&#125;</div><div class="line">server &#123;</div><div class="line">listen 80;</div><div class="line">server_name *******.com w.*******.com;</div><div class="line"><span class="comment"># access_log /usr/local/nginx/logs/access_log main;</span></div><div class="line">location / &#123;</div><div class="line">rewrite ^(.*)$ http://www.*******.com/;</div><div class="line">&#125;</div><div class="line">&#125;</div><div class="line">server &#123;</div><div class="line">listen 80;</div><div class="line">server_name ******.com;</div><div class="line"><span class="comment"># access_log /usr/local/nginx/logs/access_log main;</span></div><div class="line">location / &#123;</div><div class="line">rewrite ^(.*)$ http://www.******.com/;</div><div class="line">&#125;</div><div class="line">&#125;</div><div class="line">location /NginxStatus &#123;</div><div class="line">stub_status on;</div><div class="line">access_log on;</div><div class="line">auth_basic <span class="string">"NginxStatus"</span>;</div><div class="line">auth_basic_user_file conf/htpasswd;</div><div class="line">&#125;</div><div class="line"><span class="comment">#设定查看Nginx状态的地址</span></div><div class="line"></div><div class="line">location ~ /\.ht &#123;</div><div class="line">deny all;</div><div class="line">&#125;</div><div class="line"><span class="comment">#禁止访问.htxxx文件</span></div><div class="line">&#125;</div><div class="line"></div><div class="line">注释：变量</div><div class="line">Ngx_http_core_module模块支持内置变量，他们的名字和apache的内置变量是一致的。</div><div class="line">首先是说明客户请求title中的行，例如<span class="variable">$http_user_agent</span>,<span class="variable">$http_cookie</span>等等。</div><div class="line">此外还有其它的一些变量</div><div class="line"><span class="variable">$args</span>此变量与请求行中的参数相等</div><div class="line"><span class="variable">$content_length</span>等于请求行的“Content_Length”的值。</div><div class="line"><span class="variable">$content_type</span>等同与请求头部的”Content_Type”的值</div><div class="line"><span class="variable">$document_root</span>等同于当前请求的root指令指定的值</div><div class="line"><span class="variable">$document_uri</span>与<span class="variable">$uri</span>一样</div><div class="line"><span class="variable">$host</span>与请求头部中“Host”行指定的值或是request到达的server的名字（没有Host行）一样</div><div class="line"><span class="variable">$limit_rate</span>允许限制的连接速率</div><div class="line"><span class="variable">$request_method</span>等同于request的method，通常是“GET”或“POST”</div><div class="line"><span class="variable">$remote_addr</span>客户端ip</div><div class="line"><span class="variable">$remote_port</span>客户端port</div><div class="line"><span class="variable">$remote_user</span>等同于用户名，由ngx_http_auth_basic_module认证</div><div class="line"><span class="variable">$request_filename</span>当前请求的文件的路径名，由root或<span class="built_in">alias</span>和URI request组合而成</div><div class="line"><span class="variable">$request_body_file</span></div><div class="line"><span class="variable">$request_uri</span>含有参数的完整的初始URI</div><div class="line"><span class="variable">$query_string</span>与<span class="variable">$args</span>一样</div><div class="line"><span class="variable">$sheeme</span> http模式（http,https）尽在要求是评估例如</div><div class="line">Rewrite ^(.+)$ <span class="variable">$sheme</span>://example.com$; Redirect;</div><div class="line"><span class="variable">$server_protocol</span>等同于request的协议，使用“HTTP/或“HTTP/</div><div class="line"><span class="variable">$server_addr</span> request到达的server的ip，一般获得此变量的值的目的是进行系统调用。为了避免系统调用，有必要在listen指令中指明ip，并使用<span class="built_in">bind</span>参数。</div><div class="line"><span class="variable">$server_name</span>请求到达的服务器名</div><div class="line"><span class="variable">$server_port</span>请求到达的服务器的端口号</div><div class="line"><span class="variable">$uri</span>等同于当前request中的URI，可不同于初始值，例如内部重定向时或使用index</div></pre></td></tr></table></figure>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Nginx/" rel="tag"># Nginx</a>
          
            <a href="/tags/LNMP/" rel="tag"># LNMP</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/09/03/Nginx/1. Nginx编译安装/" rel="next" title="Nginx编译安装">
                <i class="fa fa-chevron-left"></i> Nginx编译安装
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/09/03/Nginx/11. php-fpm配置文件/" rel="prev" title="php-fpm配置文件 高并发参数配置及linux内核参数优化">
                php-fpm配置文件 高并发参数配置及linux内核参数优化 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      

      <section class="site-overview sidebar-panel sidebar-panel-active">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/0.png"
               alt="失落的乐章" />
          <p class="site-author-name" itemprop="name">失落的乐章</p>
           
              <p class="site-description motion-element" itemprop="description">失落的乐章的Blog</p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/">
                <span class="site-state-item-count">627</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">38</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/hcldirgit" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">失落的乐章</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Muse
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.1"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.1"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.1"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.1"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.1"></script>



  


  




	





  





  





  






  





  

  

  

  

  

  

</body>
</html>
